An object detecting apparatus, a method for detecting an object, and an object detection program are used to detect a target object. As conventional technologies, techniques such as the background subtraction method and inter-frame subtraction method are known. In the background subtraction method, a target object is detected by subtracting a background image, which does not include the target object, from an input image. The background subtraction method is able to detect moving or stationary target objects well, however, an accurate background image that does not include the target object must be provided. Further, when the background changes due to shifts in ambient light, it becomes difficult to obtain an accurate detection result.
In the inter-frame subtraction method, a target object is detected by differentiating frame images of an input image in a certain time interval. Unlike the background subtraction method, an accurate background image that does not include the target object does not have to be prepared, and slow background changes such as shifts in ambient light do not become an issue in the inter-frame subtraction method. However, there is a possibility that only a part of the target object is detected because of the way it works. Further, it is difficult to detect a target object not in motion since there is no inter-frame changes.
As a method for solving the problems of the background subtraction method, there is a method in which the background image is updated one after another (for instance, refer to Patent Document 1.) In Patent Document 1, a method in which the background is updated one after another by a simple addition method is disclosed. In this method, a target object is detected by performing the background subtraction method using the updated background image. It is not necessary to prepare an accurate background image that does not include the target object since the background image is updated one after another by the simple addition method. Therefore, slow background changes such as shifts in ambient light do not become an issue. However, when the target object stands stationary, or moves slowly, it becomes difficult to detect the target object because the target object is updated into the background image. Further, continuous background changes such as the swaying of trees and ripples of water present a problem since it is difficult to update the background image.
As a method for solving the problems of the method described in Patent Document 1, a method disclosed in Patent Document 2 can be used. In the method described in Patent Document 2, the variance value of the intensity is derived for a particular past interval and a particular future interval in certain point of time, and by providing threshold values for these variance values, pixel states are distinguished into a “moving state,” “transition state,” “person candidate,” and a “background.” Using these pixel states, people (including general animals) are detected. By using this method, unlike the method described in Patent Document 1, the target object can be detected even when the person (the target object) is standing stationary or moving slowly.
However, since the method disclosed in Patent Document 2 judges whether or not a person is standing stationary by differences in threshold value, when an object other than a person (for instance an object put down and left behind) stands stationary, it is difficult to detect it. In other words, the method cannot distinguish a stationary object that is not a person from the background.
Further, the method judges continuous background changes based on the assumption that the position and shape of a detected person candidate region do not change, therefore objects whose position and size change, such as the swaying of trees and ripples of water, become an issue.
In Patent Document 3, a method in which a vehicle as an object is detected using the background image is disclosed. However, the method described in Patent Document 3 does not consider the temporal aspects of the image when it judges an object.
[Patent Document 1]
Japanese Patent Kokoku Publication No. JP-B-7-31732 (Page 3, FIG. 1)
[Patent Document 2]
Japanese Patent Kokai Publication No. JP-P2004-258927A (Paragraphs 0036-0039, FIG. 5)
[Patent Document 3]
Japanese Patent Kokai Publication No. JP-P2006-59183A (Paragraphs 0007-0019)